import React from 'react';

import { RecommendOperate, TransferOperate, ThumbCommentGroup } from '@/pages/Recruitment/containers';
import { Operates } from '@/pages/Recruitment/components';

const Resume = ({ record, isPrincipal, isLauncher, onRefresh }) => {
    const { praiseEmployeeNameList = [], trampleEmployeeNameList = [], evaluateType, resumeId: id } = record;
    const operates = [
        <ThumbCommentGroup
            initState={{ praiseEmployeeNameList, trampleEmployeeNameList, evaluateType }}
            resumeId={id}
            onChange={onRefresh}
            record={record}
            onRefresh={onRefresh}
        ></ThumbCommentGroup>,
        <RecommendOperate resumeId={id} onConfirm={onRefresh} weedOutDisabled={!(isPrincipal || isLauncher)} />,
        <TransferOperate resumeId={id} />
    ];
    return <Operates operates={operates} />;
};

export default Resume;
